package com.zengqingfa.dubbo.mall;

import com.zengqingfa.dubbo.mall.config.OrderConsumerConfig;
import com.zengqingfa.dubbo.mall.entity.UserAddress;
import com.zengqingfa.dubbo.mall.service.OrderService;
import com.zengqingfa.dubbo.mall.service.OrderServiceXml;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.io.IOException;
import java.util.List;

/**
 *
 * @fileName: OrderApp
 * @author: zengqf3
 * @date: 2021-4-12 15:17
 * @description:
 */
public class OrderApp {

    public static void main(String[] args) throws IOException {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(OrderConsumerConfig.class);
        OrderService orderService = context.getBean(OrderService.class);
        List<UserAddress> userAddressList = orderService.initOrder("111");
        userAddressList.forEach(u -> {
            System.out.println(u);
        });
        System.in.read();
    }
}
